package JSE_05.Demo08;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo08Main {
    public static void main(String[] args) throws Exception {
        FileInputStream fis=new FileInputStream("D:\\city.jpg");
        FileOutputStream fos=new FileOutputStream("E:\\city.jpg"); // C:拒绝访问
        byte[] bytes=new byte[1024];
        int len=0;
        while((len=fis.read(bytes))!=-1){
            fos.write(bytes,0,len);
        }

        fos.close();
        fis.close();
    }
}
